package com.woniuxy.core.status;

public enum OrderState {
    NOT_PAY("未支付",0),
    IS_PAID("已支付",1),
    CANCELED("已取消",2),
    COMPLETED("已完成",3),
    NOT_EVALUATION("待评价",0),
    IS_EVALUATION("已评价",1),
    PERSONAL_COACH_TYPE("私教课",0),
    GROUP_TYPE("团教课",1),
    COUNT_CARD_TYPE("次卡",2),
    VALID_CARD_TYPE("有效期卡",3);

    private String name;
    private Integer state;

    OrderState(String name, Integer state) {
        this.name = name;
        this.state = state;
    }
    public static String searchTypeName(Integer typeId){
        if (typeId==PERSONAL_COACH_TYPE.getState()){
            return PERSONAL_COACH_TYPE.getName();
        } else if (typeId == GROUP_TYPE.getState()) {
            return GROUP_TYPE.getName();
        } else if (typeId == COUNT_CARD_TYPE.getState()) {
            return COUNT_CARD_TYPE.getName();
        } else if (typeId == VALID_CARD_TYPE.getState()) {
            return VALID_CARD_TYPE.getName();
        }else {
            return null;
        }
    }
    public String getName() {
        return name;
    }
    public Integer getState() {
        return state;
    }

}
